﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

using AFCEPF.BankApplication.DAL;

namespace AFCEPF.BankApplication.BLL
{
    public class DecisionChain 
    {
        private IRequestApprover<RequestBase> _baseApprover;

        public DecisionChain()
        {
            var manager     = new Manager();
            var director    = new Director();
            var president   = new President();

            manager.SetSuccessor(director);
            director.SetSuccessor(president);

            _baseApprover = manager;
        }


        public void ProcessRequest(RequestBase request)
        {
            _baseApprover.ProcessRequest(request);
        }


    }
}
